home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5168 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.0 KB  |  35 lines

  1. Newsgroups: comp.lang.c++
  2. Path: uucp-1.csn.net!slimer!jennings
  3. From: jennings@igs.com (Jeff Jennings)
  4. Subject: Re: Argument from commandline???
  5. Message-ID: <1996Feb2.195836.12004@igs.com>
  6. Organization: Igs, Inc.
  7. X-Newsreader: TIN [version 1.2 PL2]
  8. References: <4eou36$p6g@prometheus.algonet.se> <4erec9$f88@clarknet.clark.net>
  9. Date: Fri, 2 Feb 96 19:58:36 GMT
  10.  
  11. Harlan Messinger (gusty@clark.net) wrote:
  12. : Nylund Patrik (bifrost@algonet.se) wrote:
  13. : : How do I include argument from the commandline to the main function in
  14. : : a c++ program?
  15. : : 
  16.  
  17.  
  18. : The proper full definition of the function "main" is
  19.  
  20. : int main(int argc, char *argv[]) {
  21. :     ...
  22. : }
  23.  
  24. actually, it's:
  25.  
  26. int main(int argc, char *argv[], char *envp[]) {
  27.  ...
  28. }
  29.  
  30. -- 
  31. Jeff Jennings                __o   | You can't solve a problem using the
  32. jennings@igs.com           _ \<,_  | same thinking that got you there.
  33. (303)449-1110 x2203       (_)/ (_) |                   - Albert Einstein
  34. GCS -d+ -p+ c++ l++ u+(++) e++ m+ s/+ n+(---) h---(*) f+(-) !g w+ t++ r- y+(*)
  35.